//结构体的不同的函数参数传递方式
#include <iostream>
#include <string>
using namespace std;
typedef struct {
  string name;
  int age;
  int source;
} Student;
void print_p(Student* l) {
  cout <<"姓名："<< l->name << endl;
  cout <<"年龄："<< l->age << endl;
  cout <<"成绩："<< l->source << endl;
}
void print_z(Student s){
    cout <<"姓名："<< s.name << endl;
    cout <<"年龄："<< s.age << endl;
    cout <<"成绩："<< s.source << endl;
}
int main() {
  Student s;
  s.name = "张三";
  s.age = 19;
  s.source = 88;
  print_p(&s);
  print_z(s);
  return 0;
}